import { ApiProperty } from '@midwayjs/swagger';

export class DPEngineInfoCreateDto {

  @ApiProperty({
    description: '引擎名称',
    example: 'Engine 1',
  })
  EngName: string;

  @ApiProperty({
    description: '引擎类型',
    example: 1,
  })
  EngineType: number;

  @ApiProperty({
    description: '网络信息',
    example: 'Network A',
    required: false,
  })
  NetWork?: string;

  @ApiProperty({
    description: '训练名称',
    example: 'Training 1',
    required: false,
  })
  TrainName?: string;

  @ApiProperty({
    description: '训练路径',
    example: '/path/to/training',
    required: false,
  })
  TrainPath?: string;

  @ApiProperty({
    description: '检测名称',
    example: 'Detection 1',
    required: false,
  })
  DetectName?: string;

  @ApiProperty({
    description: '检测路径',
    example: '/path/to/detection',
    required: false,
  })
  DetectPath?: string;

  @ApiProperty({
    description: '备注',
    example: 'This is a remark',
    required: false,
  })
  Mark?: string;

  @ApiProperty({
    description: '训练参数，二进制数据',
    example: null,
    required: false,
  })
  TrainPara?: Buffer;

  @ApiProperty({
    description: '检测参数，二进制数据',
    example: null,
    required: false,
  })
  DetectPara?: Buffer;
}

export class DPEngineInfoUpdateDto {

  @ApiProperty({
    description: '主键ID',
    example: 1,
  })
  OBJID: number;

  @ApiProperty({
    description: '引擎名称',
    example: 'Updated Engine Name',
    required: false,
  })
  EngName?: string;

  @ApiProperty({
    description: '引擎类型',
    example: 2,
    required: false,
  })
  EngineType?: number;

  @ApiProperty({
    description: '网络信息',
    example: 'Updated Network Info',
    required: false,
  })
  NetWork?: string;

  @ApiProperty({
    description: '训练名称',
    example: 'Updated Training Name',
    required: false,
  })
  TrainName?: string;

  @ApiProperty({
    description: '训练路径',
    example: '/new/path/to/training',
    required: false,
  })
  TrainPath?: string;

  @ApiProperty({
    description: '检测名称',
    example: 'Updated Detection Name',
    required: false,
  })
  DetectName?: string;

  @ApiProperty({
    description: '检测路径',
    example: '/new/path/to/detection',
    required: false,
  })
  DetectPath?: string;

  @ApiProperty({
    description: '备注',
    example: 'Updated remark',
    required: false,
  })
  Mark?: string;

  @ApiProperty({
    description: '训练参数，二进制数据',
    example: null,
    required: false,
  })
  TrainPara?: Buffer;

  @ApiProperty({
    description: '检测参数，二进制数据',
    example: null,
    required: false,
  })
  DetectPara?: Buffer;
}

export class DPEngineInfoQueryDto {

  @ApiProperty({
    description: '引擎名称',
    example: 'Engine 1',
    required: false,
  })
  EngName?: string;

  @ApiProperty({
    description: '引擎类型',
    example: 1,
    required: false,
  })
  EngineType?: number;

  @ApiProperty({
    description: '当前页码',
    example: 1,
  })
  page: number = 1;  // Default page number

  @ApiProperty({
    description: '每页显示的数量',
    example: 10,
  })
  limit: number = 10;  // Default number of items per page
}

export class DPEngineInfoDeleteDto {

  @ApiProperty({
    description: '主键ID',
    example: 1,
  })
  OBJID: number;
}
